package com.aididi.collection;

import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

/**
 * @Auther: zx.xu
 * @Description:
 */
public class SetDemo {
    public static void main(String[] args) {
        Set set1 = new HashSet();
        Set set2 = new CopyOnWriteArraySet();
        set1.add(null);
        set1.add(null);
        set1.add("s");
        System.out.println(set1.size());// 2

    }
}
